package com.dz.finance.biz.entity;

import lombok.Data;

import java.util.Date;

/**
 * @author: DengHaoQi
 * @date: 2024/5/28 19:50
 * @description:
 */

@Data
public class MemberBindPhone {

    private Long id;

    private String phone;

    private String password;

    private Long memberId;

    // 是否禁用(1禁用 0不禁用)
    private Integer disable;

    private Date createTime;

    private Date updateTime;

    public void initDefault() {
        if (this.getPhone() == null) {
            this.setPhone("");
        }
        if (this.getMemberId() == null) {
            this.setMemberId(0L);
        }
        if (this.getDisable() == null) {
            this.setDisable(0);
        }
        if (this.getCreateTime() == null) {
            this.setCreateTime(new Date());
        }
        if (this.getUpdateTime() == null) {
            this.setUpdateTime(new Date());
        }
    }
}
